<?php
if (!defined('BASEPATH'))
    exit('no direct script allowed asshole!!');
$this->load->helper('html');
?>


<!-- JavaScript -->
<script type="text/javascript" src="<?= base_url() ?>js/wufoo.js"></script>

<!-- CSS -->
<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/form/form.css" media="screen, tv, projection" title="Default" />


<div id="container">
    <fieldset class="fieldset">
        <legend class="legend">|Detail Data Proyek|</legend>

        <div id="contentform" style="border:solid thin #BBBBBB; height:350px; background-color:#F9F9F9; -moz-border-radius: 5px;  padding-top:10px; padding-bottom:0.3px; margin-right:100px; margin-left:100px;">

            <!-- Start value -->
            <?
            //Setting Value Jika Prosedur yang dilakukan adalah prosedur input biasa.
            $value = array(
				'ID_PROYEK' => "",
                'NAMA_PROYEK' => "",
                'NOMOR_KONTRAK' => "",
                'OWNER' => "",
                'ID_PEGAWAI' => "",
                'JENIS_KAPAL' => "",
                'KECEPATAN' => "",
                'PANJANG' => "",
                'LEBAR' => "",
                'TINGGI' => "",
                'SARAT' => "",
                'RUTE_PELAYARAN' => "",
                'TANGGAL_MULAI_PROYEK' => "",
                'TANGGAL_SELESAI_PROYEK' => "",
				'STATUS_PROYEK' => "",
				'act_form' => "PROYEK/upload/"
            );
			

            //Setting Value pada form Jika melakukan prosedur Edit terhadap data tertentu.
            if ($status == "detail_proyek") {
                $value['ID_PROYEK'] = $ID_PROYEK;
                $value['NAMA_PROYEK'] = $NAMA_PROYEK;
                $value['NOMOR_KONTRAK'] = $NOMOR_KONTRAK;
                $value['OWNER'] = $OWNER;
				$value['ID_PEGAWAI'] = $ID_PEGAWAI;
                $value['JENIS_KAPAL'] = $JENIS_KAPAL;
                $value['KECEPATAN'] = $KECEPATAN;
                $value['PANJANG'] = $PANJANG;
                $value['LEBAR'] = $LEBAR;
                $value['TINGGI'] = $TINGGI;
                $value['SARAT'] = $SARAT;
                $value['RUTE_PELAYARAN'] = $RUTE_PELAYARAN;
                $value['TANGGAL_MULAI_PROYEK'] = $TANGGAL_MULAI_PROYEK;
				$value['TANGGAL_SELESAI_PROYEK'] = $TANGGAL_SELESAI_PROYEK;
				$value['STATUS_PROYEK'] = $STATUS_PROYEK;
				$value['act_form'] = "proyek/edit/" . $value['ID_PROYEK'];
                }//end if
            ?>

            <?= form_open_multipart($value["act_form"]); ?>
           
            <!-- End value -->

            <table width="847" border="0" bordercolor="#F0F0F0">
                <tr>
                    <td width="905" height="150">
                        <form id="form1" name="form1" method="post">
                            <div align="center">
                                <table width="850" border="0">
                                    <tr>
                                        <td width="80">Nama Proyek</td>
                                        <td width="280">: <?= $value['NAMA_PROYEK'] ?></td>
                                    </tr>
                                    <tr>
                                        <td width="80">Nomer Kontrak</td>
                                        <td width="280">: <?= $value['NOMOR_KONTRAK'] ?></td>
                                    </tr>
                                    <tr>
                                        <td width="80">Owner</td>
                                        <td width="280">: <?= $value['OWNER'] ?></td>
                                    </tr>
                                    <tr>
                                        <td width="80">ID-PEGAWAI</td>
                                        <td width="280">: <?= $value['ID_PEGAWAI'] ?></td>
                                    </tr>
                                    <tr>
                                        <td width="80">Jenis Kapal</td>
                                        <td width="280">: <?= $value['JENIS_KAPAL'] ?></td>
                                    </tr>
                                    <tr>
                                        <td width="80">Kecepatan</td>
                                        <td width="280">: <?= $value['KECEPATAN'] ?></td>
                                    </tr>
                                    <tr>
                                        <td width="80">Panjang</td>
                                        <td width="280">: <?= $value['PANJANG'] ?></td>
                                    </tr>
                                    <tr>
                                        <td width="80">Lebar</td>
                                        <td width="280">: <?= $value['LEBAR'] ?></td>
                                    </tr>
                                    <tr>
                                        <td width="80">Tinggi</td>
                                        <td width="280">: <?= $value['TINGGI'] ?></td>
                                    </tr>
                                    <tr>
                                        <td width="80">Sarat</td>
                                        <td width="208">: <?= $value['SARAT'] ?></td>
                                    </tr>
                                    <tr>
                                        <td width="80">Rute Pelayaran</td>
                                        <td width="208">: <?= $value['RUTE_PELAYARAN'] ?></td>
                                    </tr>
                                    <tr>
                                        <td width="80">Tanggal Mulai Proyek</td>
                                        <td width="208">: <?= $value['TANGGAL_MULAI_PROYEK'] ?></td>
                                    </tr>
                                    <tr>
                                        <td width="80">Tanggal Selesai Proyek</td>
                                        <td width="208">: <?= $value['TANGGAL_SELESAI_PROYEK'] ?></td>
                                    </tr>
                                    <tr>
                                        <td width="80">Status Proyek</td>
                                        <td width="208">: <?= $value['STATUS_PROYEK'] ?></td>
                                    </tr>
									<?
                                    if ($status == "detail_PROYEK") {
                                        echo '
                                            <tr>
                                            <td width="80">&nbsp;</td>
                                            <td width="208"> <img src='.$FOTO_PROYEK.' width="150" height="150"></td>
                                            </tr>
   
                                        ';
										
                                    } else {
                                        echo'
                                        <tr>
                                        <td>Foto</td>
                                        <td><input type="file" name="FOTO_PROYEK" size="30"/></td>
                                        </tr>
                                        ';
                                    }
                                    ?>
									<tr>
                                        <td height="28">&nbsp;</td>
                                        <td>
                                            <div align="left">
                                                <input type="submit" name="Submit" value="Edit" />
												<a href="<?php echo site_url('PROYEK/index') ?>">
												<input type="button" value="Kembali" />
												</a>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </form>
                        <p align="center">&nbsp;</p></td></tr>
            </table>
        </div>
        <p>&nbsp;</p>
    </fieldset>
</div>
<p>
    <!--container-->
</p>
<p>&nbsp; </p>

